<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateHouseAttrTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('house_attr', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('pid')->default('0')->nullable()->comment('上级id');
            $table->string('name')->default('')->comment('名称');
            $table->string('filed_name')->nullable()->comment('房源属性字段名');
            $table->string('icon')->nullable()->comment('属性图标');
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('house_attr');
    }
}
